﻿using com.nm.Attributes;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace VerticaAPI.model
{
    public class DwYearHolidayModel
    {
        /// <summary>
        /// 节日详细信息
        /// </summary>
        public class NeceModel
        {
            [ParamDescription("年")]
            public long? HolidayYearv { get; set; }
            [ParamDescription("节日名称")]
            public string TypeName { get; set; }
            [ParamDescription("序号")]
            public long? HolidayNum { get; set; }
            [ParamDescription("日期")]
            public string GregorianDay { get; set; }
        }

        public class CreatModel: NeceModel
        {
            [ParamDescription("数据源")]
            public string ExtrSource { get; set; }
            [ParamDescription("公司代码")]
            public string CompanyID { get; set; }
            [ParamDescription("读取时间")]
            public DateTime? LoadTime { get; set; }
        }

        /// <summary>
        /// 节日列表
        /// </summary>
        public class ListModel: NeceModel
        {
            [ParamDescription("开始时间")]
            public string StartDate { get; set; }
            [ParamDescription("结束时间")]
            public string EndDate { get; set; }
        }
        /// <summary>
        /// 修改节日
        /// </summary>
        public class ModifyModel : ListModel
        {
            [ParamDescription("原来的开始时间")]
            public string OldStartDate { get; set; }
            [ParamDescription("原来的结束时间")]
            public string OldEndDate { get; set; }
        }

        /// <summary>
        /// 设置节日
        /// </summary>
        public class InitModel
        {
            [ParamDescription("节日集合")]
            public IList<ModifyModel> list { get; set; }
        }

        /// <summary>
        /// 节日信息
        /// </summary>
        public class HolidayModel
        {
            [ParamDescription("节日名称")]
            public string TypeName { get; set; }

            [ParamDescription("节日持续时间")]
            public int Duration { get; set; }

            [ParamDescription("节日开始日期")]
            public string BeginDate { get; set; }

            [ParamDescription("是否是最近的下一个节日")]
            public bool IsNext { get; set; }
        }


        /// <summary>
        /// 图表绑定用的节日信息
        /// </summary>
        public class ChartModel
        {
            [ParamDescription("当前年份")]
            public string Year { get; set; }

            [ParamDescription("节日数据")]
            public List<HolidayModel> List { get; set; }
        }
    }
}
